package com.qingke.notlonely.bean;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
@Entity
@Table(name="degree")
public class Degree {
	@Id
	@Column(name="id")
	private int id;
	@Column(name="degree")
	private String degree;
	@Column(name="level")
	private int level;
	@OneToMany(mappedBy="degree",fetch=FetchType.LAZY)
	private Set<Eduction> eductions;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getDegree() {
		return degree;
	}
	public void setDegree(String degree) {
		this.degree = degree;
	}
	public int getLevel() {
		return level;
	}
	public void setLevel(int level) {
		this.level = level;
	}
	public Set<Eduction> getEductions() {
		return eductions;
	}
	public void setEductions(Set<Eduction> eductions) {
		this.eductions = eductions;
	}
	@Override
	public String toString() {
		return degree;
	}
}
